g++ preproc_matrix.cpp -O3 -g -o preproc_matrix
g++ preproc_vec.cpp -O3 -g -o preproc_vec

# TODO: DATA_PATH should contain kvlcc2 and suboff folders 
DATA_PATH=/data

mkdir -p ${DATA_PATH}/kvlcc2/u_101
mkdir -p ${DATA_PATH}/kvlcc2/v_101
mkdir -p ${DATA_PATH}/kvlcc2/w_101

mkdir -p ${DATA_PATH}/suboff/u_101
mkdir -p ${DATA_PATH}/suboff/v_101
mkdir -p ${DATA_PATH}/suboff/w_101

for var in u v w
do
    ./preproc_matrix ${DATA_PATH}/kvlcc2/matrix_${var}_101.dat ${DATA_PATH}/kvlcc2/${var}_101 351864 2426070
done

for var in u v w
do
    ./preproc_matrix ${DATA_PATH}/suboff/suboff_matrix_${var}_101.dat ${DATA_PATH}/suboff/${var}_101 1277000 8946506
done

for var in u v w
do
    ./preproc_vec ${DATA_PATH}/kvlcc2/vector_init_${var}_101.dat ${DATA_PATH}/kvlcc2/${var}_101 351864 0
done

for var in u v w
do
    ./preproc_vec ${DATA_PATH}/kvlcc2/vector_rhs_${var}_101.dat ${DATA_PATH}/kvlcc2/${var}_101 351864 1
done

for var in u v w
do
    ./preproc_vec ${DATA_PATH}/suboff/suboff_vector_init_${var}_101.dat ${DATA_PATH}/suboff/${var}_101 1277000 0
done

for var in u v w
do
    ./preproc_vec ${DATA_PATH}/suboff/suboff_vector_rhs_${var}_101.dat ${DATA_PATH}/suboff/${var}_101 1277000 1
done

